package com.gusha.model;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Entity
@Table(name="sys_report")
@NamedQuery(name="SysReport.findAll", query="SELECT s FROM SysReport s")
@DynamicInsert
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysReport implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private BigInteger id;
	
	@Column(name="content_type")
	private BigInteger contentType;//1:资讯2培训3资讯评论4培训评论
	
	@Column(name="content_id")
	private BigInteger contentId;
	
	@Column(name="report_type")
	private BigInteger reportType;//1:涉及暴力色情2:违法违禁3:涉及赌博4:不良信息5:人身攻击6:版权转载问题7:其他问题
	
	@Column(name="report_contents")
	private String reportContents;
	
	@ManyToOne(fetch=FetchType.LAZY)
   	@NotFound(action=NotFoundAction.IGNORE)
   	@JoinColumn(name="user_id")
	private User user;
	
	@Column(name="is_check")
	private BigInteger isCheck;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="report_time")
	private Date reportTime;
	
	@Column(name="check_content")
	private String checkContent;
	
	

	public String getCheckContent() {
		return checkContent;
	}

	public void setCheckContent(String checkContent) {
		this.checkContent = checkContent;
	}

	public BigInteger getId() {
		return id;
	}

	public void setId(BigInteger id) {
		this.id = id;
	}

	public BigInteger getContentType() {
		return contentType;
	}

	public void setContentType(BigInteger contentType) {
		this.contentType = contentType;
	}

	public BigInteger getContentId() {
		return contentId;
	}

	public void setContentId(BigInteger contentId) {
		this.contentId = contentId;
	}

	public BigInteger getReportType() {
		return reportType;
	}

	public void setReportType(BigInteger reportType) {
		this.reportType = reportType;
	}

	public String getReportContents() {
		return reportContents;
	}

	public void setReportContents(String reportContents) {
		this.reportContents = reportContents;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public BigInteger getIsCheck() {
		return isCheck;
	}

	public void setIsCheck(BigInteger isCheck) {
		this.isCheck = isCheck;
	}

	public Date getReportTime() {
		return reportTime;
	}

	public void setReportTime(Date reportTime) {
		this.reportTime = reportTime;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
	
}
